<ui-section header="主包Manifest配置" expand>
    <ui-prop>
        <ui-label class="contentColor">注意，主包版本目前只包含了 assets/main &
            assets/resources,如果对src目录下有需要升级的，请在extensions/hotupdate/panels/index.js的getMainBundleIncludes函数中添加进入版本
        </ui-label>
    </ui-prop>
    <ui-prop>
        <ui-label slot="label" class="titleColor">自动生成版本号</ui-label>
        <ui-checkbox slot="content" v-bind:disabled="isProcessing" v-bind:value="isAutoVersion"
            @confirm="onChangeAutoVersion($event.target.value)" tooltip="当构建完成后，自动生成版本号">当构建完成后，自动生成版本号
        </ui-checkbox>
    </ui-prop>

    <ui-prop>
        <ui-label slot="label" class="titleColor" tooltip="APP的版本号设置，内置在包内的版本号，不会发生变化">App版本号</ui-label>
        <ui-input slot="content" class="contentColor" v-on:blur="onInputAppVersionOver($event.target.value)"
            v-bind:value="appVersion" v-bind:disabled="isProcessing">
        </ui-input>
    </ui-prop>
    <ui-prop>
        <ui-label slot="label" class="titleColor" tooltip="主包版本号，指热更新的版本">版本号</ui-label>
        <ui-input slot="content" class="contentColor" v-on:blur="onInputVersionOver($event.target.value)"
            v-bind:value="version" v-bind:disabled="isProcessing||isAutoVersion">
        </ui-input>
    </ui-prop>
    <ui-prop>
        <ui-label slot="label" class="titleColor" tooltip="游戏热更新服务器地址">服务器地址</ui-label>
        <ui-input slot="content" v-bind:disabled="isProcessing" class="contentColor"
            v-on:blur="onInputUrlOver($event.target.value)" v-bind:value="serverIP"></ui-input>
        <ui-button slot="content" v-bind:disabled="isProcessing" v-on:confirm="onUserLocalIP">使用本机IP</ui-button>
    </ui-prop>
    <ui-prop>
        <ui-label slot="label" class="titleColor" tooltip="游戏热更新历史配置服务器地址">服务器历史地址</ui-label>
        <ui-select v-bind:disabled="isProcessing" title="服务器历史地址" slot="content" v-on:change="onChangeHotupdateUrls"
            v-bind:value="serverIP">
            <option v-for="url in hotupdateUrls" :value="url">{{url}}</option>
        </ui-select>
    </ui-prop>
    <ui-prop>
        <ui-label slot="label" class="titleColor"
            tooltip="该目录指向构建生成的bulid/(android|windows)/assets目录，manifest文件将会生成在这个目录下">构建目录</ui-label>
        <ui-file v-bind:disabled="isProcessing" v-bind:value="buildDir"
            @confirm="onBuildDirConfirm($event.target.value)" slot="content" type="directory"></ui-file>
    </ui-prop>
    <ui-prop>
        <ui-label slot="label" class="titleColor" tooltip="Manifest输出目录">Manifest输出目录</ui-label>
        <ui-file v-bind:value="buildOutDir" slot="content" type="directory" disabled></ui-file>
    </ui-prop>
    <ui-prop>
        <ui-label slot="label" class="titleColor">版本生成进度</ui-label>
        <ui-progress slot="content" v-bind:value="createProgress"></ui-progress>
    </ui-prop>
    <ui-prop>
        <ui-label slot="label" class="titleColor">操作</ui-label>
        <ui-checkbox slot="content" v-bind:disabled="isProcessing" v-bind:value="autoCreate"
            @confirm="onChangeAutoCreateManifest($event.target.value)" tooltip="当构建完成后，自动生成版本控制文件">是否自动创建版本文件
        </ui-checkbox>
        <ui-checkbox slot="content" v-bind:disabled="isProcessing" v-bind:value="autoDeploy"
            @confirm="onChangeAutoDeploy($event.target.value)" tooltip="当构建完成后，且自动生成版本文件打开,生成成功后自动部署">是否自动部署
        </ui-checkbox>
        <ui-button @confirm="onDelBunles" v-bind:disabled="isProcessing" slot="content" class="red">执行Bundle剔除
        </ui-button>
        <ui-button @confirm="onCreateManifest" v-bind:disabled="isProcessing" slot="content" class="green">生成
        </ui-button>
    </ui-prop>
</ui-section>
<ui-section header="Bundles Manifest配置" expand>
    <ui-prop v-for="bundle in bundles">
        <ui-label slot="label" class="titleColor">{{ bundle.name + "(" + bundle.dir + ")" }}</ui-label>
        <ui-checkbox v-bind:disabled="isProcessing" slot="content" class="contentColor" v-bind:value="bundle.includeApk"
            @confirm="onChangeIncludeApk($event.target.value,bundle.dir)">是否包含在原始包内</ui-checkbox>
        <ui-input v-bind:disabled="isProcessing||isAutoVersion" slot="content" class="contentColor"
            v-bind:value="bundle.version" @confirm="onChangeBundleVersion($event.target.value,bundle.dir)"></ui-input>
    </ui-prop>
</ui-section>
<!-- 测试环境 -->
<ui-section header="测试环境" expand>
    <ui-prop>
        <ui-label slot="label" class="titleColor" tooltip="主包地址,显示格式 [版本号]:md5">主包地址</ui-label>
        <ui-label slot="content" class="titleColor" v-bind:value="remoteVersion">-</ui-label>
        <ui-button @confirm="onRefreshMainVersion" slot="content">刷新</ui-button>
    </ui-prop>
    <ui-prop v-for="bundle in remoteBundles">
        <ui-label slot="label" class="titleColor">{{ bundle.name + "(" + bundle.dir + ")" }}</ui-label>
        <ui-label slot="content" class="titleColor">{{bundle.md5}}</ui-label>
        <ui-button @confirm="onRefreshVersion(bundle.dir)" slot="content">刷新</ui-button>
    </ui-prop>
    <ui-prop>
        <ui-label slot="label" class="titleColor" tooltip="当点击部署时会直接部署到这个地址上">本机服务器路径</ui-label>
        <ui-file v-bind:value="remoteDir" @confirm="onRemoteDirConfirm($event.target.value)" slot="content"
            type="directory"></ui-file>
    </ui-prop>
    <ui-prop>
        <ui-label slot="label" class="titleColor">本地测试服务器部署操作</ui-label>
    </ui-prop>
    <ui-prop>
        <ui-progress v-bind:value="progress" style="width: 100%;"></ui-progress>
    </ui-prop>
    <ui-prop>
        <ui-button v-bind:disabled="isProcessing" @confirm="onDeployToRemote">部署</ui-button>
    </ui-prop>
</ui-section>